<template>
  <h2>页面不存在！<span>{{num}}</span>秒后将返回登录页面</h2>
</template>

<script>
export default {
    data() {
        return {
            num:5
        }
    },
    mounted() {
        let timer = setInterval(() =>{
            this.num--
            if(this.num == 0 ){
                this.$router.push('/login');
                clearInterval(timer);
            }
        },1000)
    },
}
</script>

<style scoped>
span{
    color: red;
}
</style>